package API.DAY1;

public class StringBuildDemo {// StringBuilder的使用
    public static void main(String[] args) {
//        StringBuilder a = new StringBuilder();
//        StringBuilder b = new StringBuilder("abc");
//
//        String c = "abc";
//        StringBuilder d = new StringBuilder(c);
//        System.out.println(d.toString());

        StringBuilder x = new StringBuilder("Hello World!");
        System.out.println(x.append("你好"));
        System.out.println(x.replace(12,14,"好好学"));
        System.out.println(x.delete(0,12));
        System.out.println(x.insert(0,"加油"));
        System.out.println(x.reverse());
    }
}
